﻿<?php
if (!isset($_GET['town'])) {
    echo "Системная ошибка!";
} else {
    $town=$_GET['town'];
}
include '../bd.php';
$result_select_id = mysql_query("SELECT * FROM town WHERE street='$town'",$db); 
$myrow_ip = mysql_fetch_array($result_select_id);
echo "Город - ".$myrow_ip["town"];
$i = $myrow_ip["town"];
$result_select_id_1 = mysql_query("SELECT * FROM town WHERE town='$i'",$db); 
$myrow_ip_1 = mysql_fetch_array($result_select_id_1);
echo ", Область - ".$myrow_ip_1["region"];
?>
